﻿using PLCS.Domain.Shared.Enums;

namespace PLCS.Domain.Shared.Tasks;

public class TaskFinshEvent
{
    /// <summary>
    /// Id
    /// </summary>
    public Guid Id { get; set; }

    /// <summary>
    /// 任务号
    /// </summary>
    public int TaskId { get; set; }

    /// <summary>
    /// 上层任务号
    /// </summary>
    public string? TaskId_Higher { get; set; }

    /// <summary>
    /// 工单号
    /// </summary>
    public string? OrderNo { get; set; }

    /// <summary>
    /// 托盘号
    /// </summary>
    public string? TrayNo { get; set; }

    /// <summary>
    /// 任务来源
    /// </summary>
    public string TaskSource { get; set; }

    /// <summary>
    /// 任务类型
    /// </summary>
    public TaskType TaskType { get; set; }

    /// <summary>
    /// 任务起始位（大的目标）
    /// </summary>
    public string? StartPos { get; set; }

    /// <summary>
    /// 任务目标位（大的目标）
    /// </summary>
    public string? EndPos { get; set; }

    /// <summary>
    /// 任务级别
    /// </summary>
    public int Level { get; set; }

    /// <summary>
    /// 途径工位（可以为空，也可以是一个或者多个，用‘，’隔开）
    /// </summary>
    public string? WayStation { get; set; }

    /// <summary>
    /// 托盘类型
    /// </summary>
    public TrayType TrayType { get; set; }

    /// <summary>
    /// 任务状态
    /// </summary>
    public TaskStatus TaskStatus { get; private set; }

    /// <summary>
    /// 任务前执行方法
    /// </summary>
    public string? BeforeExecutionMethod { get; set; }

    /// <summary>
    /// 任务前执行参数
    /// </summary>
    public string? BeforeExecutionParam { get; set; }

    /// <summary>
    /// 任务完成执行方法
    /// </summary>
    public string? AfterExecutionMethod { get; set; }

    /// <summary>
    /// 任务完成执行参数
    /// </summary>
    public string? AfterExecutionParam { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreationTime { get; set; }

    /// <summary>
    /// 开始时间
    /// </summary>
    public DateTime? StartTime { get; set; }
}